import React, { Component, PropTypes } from 'react';
import { Row, Col, Card, Steps, Icon, List, Avatar, Input, Button } from 'antd'
import detailApi from '../../../api/mainbody/detail' 

import "./detail.scss"
const Step = Steps.Step;
const { TextArea } = Input;
const data = [
    {
        avatar: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526647099998&di=de797d0dd610c67373647c916d3e1e4f&imgtype=0&src=http%3A%2F%2Fk2.jsqq.net%2Fuploads%2Fallimg%2F1701%2F10_170120141806_3.jpg",
        title: '章云峰完成了磐晟资产-开基本户的工作,备注终于搞定了',
        description: '2分钟前',
    },
    {
        avatar: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526647161979&di=a213c63c11cbf407e1f7c0208570d118&imgtype=0&src=http%3A%2F%2Fimg1.2345.com%2Fduoteimg%2FqqTxImg%2F2013%2F12%2Fwm%2F26-010722_183.jpg",
        title: '朱老师成了磐晟资产-开基本户的工作,备注终于搞定了',
        description: '2分钟前',
    },

];



export default class Detail extends Component {
    constructor() {
        super()
    }

    componentDidMount() {
        this.getMainBodyDetail(this.props.id)    
    }

    getMainBodyDetail=async(id)=>{
           const res=await  detailApi.getMainBodyDetail(id);
           console.log(res)
    }

    render() {
        return (
            <div style={{ background: 'rgba(240,242,245,1)'}}>
                <Card title="工作进度">
                    <Steps progressDot current={1}>
                        <Step title="设立主体" description={<div className="setpDiv"><div>李晓燕<Icon style={{ marginLeft: 5 }} type="check-circle" /></div><div>2016-12-12</div></div>} />
                        <Step title="开基本户" description={<div className="setpDiv"><div>范杨舟<Icon style={{ marginLeft: 5 }} type="check-circle-o" /></div><div style={{ color: 'rgba(24,144,255,1)' }}>催一下</div></div>} />
                        <Step title="开募集户" />
                        <Step title="备案" />
                        <Step title="完成" />
                    </Steps>
                </Card>
                <Card title="主体信息" style={{ marginTop: 20, fontSize: 14, lineHeight: 2 }}>
                    <Row>
                        <Col span={8}>
                            <p><b>主体简称:</b>{this.props.data.nickname}</p>
                            <p><b>主体全称:</b>{this.props.data.fullname}</p>

                        </Col>
                        <Col span={8}>
                            <p><b>证件号码</b>{this.props.data.idNum}</p>
                            <p><b>注册地址</b>北京市朝阳区建国门外大街甲6号1幢11层C座十二层1206室</p>
                        </Col>
                        <Col span={8}>
                            <p><b>固定电话:</b>{this.props.data.phone}</p>
                            <p><b>办公地址</b>北京市朝阳区建外大街甲6号华熙国际D座23层</p>
                        </Col>
                    </Row>

                    <Row style={{ marginTop: 30 }}>
                        <h3>资本信息</h3>
                        <Col span={8}>
                            <p><b style={{marginRight:5}}>注册资本</b>{this.props.data.regCapital?currency(this.props.data.regCapital.currency):""}{this.props.data.regCapital?this.props.data.regCapital.amount:""}元</p>
                            <p><b style={{marginRight:5}}>实缴资本:</b>{this.props.data.paidCapital?currency(this.props.data.paidCapital.currency):""}{this.props.data.paidCapital?this.props.data.paidCapital.amount:""}元</p>

                        </Col>
                        <Col span={8}>
                            <p><b>该数据更新时间：</b>{this.props.data.updatedAt}</p>
                            {/* <p><b>该数据更新时间：</b>2017-04-05 </p> */}
                        </Col>
                    </Row>

                    <Row>
                        <h3>账户信息</h3>
                        <Card title="基本户" type="inner" style={{ fontSize: 14, lineHeight: 2.5 }}>
                            <p>招商银行</p>
                            <Col span={8}>
                                <p><b>开户户:</b>招商银行股份有限公司北京大望路支行</p>
                                <p><b>财务人员:</b>尹孟奇 <Icon style={{ marginLeft: 5, color: "rgb(24,155,255)" }} type="check-circle" /></p>

                            </Col>
                            <Col span={8}>
                                <p><b>证件号码</b>110909021810902</p>
                                <p><b>操作人员：</b>苏静<Icon style={{ marginLeft: 5, color: "rgb(24,155,255)" }} type="check-circle" /></p>
                            </Col>
                            <Col span={8}>
                                <p><b>账户名:</b>北京磐晟投资管理有限公司</p>
                                <p><b>管理人员：</b>马克芬<Icon style={{ marginLeft: 5, color: "rgb(24,155,255)" }} type="check-circle" /></p>
                            </Col>



                        </Card>
                        <Card title="募集户" type="inner" style={{ fontSize: 14, lineHeight: 2.5 }}>
                            <p>招商银行</p>
                            <Col span={8}>
                                <p><b>开户户:</b>招商银行股份有限公司北京大望路支行</p>
                                <p><b>财务人员:</b>尹孟奇 <Icon style={{ marginLeft: 3, color: "rgb(24,155,255)" }} type="check-circle" /></p>

                            </Col>
                            <Col span={8}>
                                <p><b>证件号码</b>110909021810902</p>
                                <p><b>操作人员：</b>苏静<Icon style={{ marginLeft: 3, color: "rgb(24,155,255)" }} type="check-circle" /></p>
                            </Col>
                            <Col span={8}>
                                <p><b>账户名:</b>北京磐晟投资管理有限公司</p>
                                <p><b>管理人员：</b>马克芬<Icon style={{ marginLeft: 3, color: "rgb(24,155,255)" }} type="check-circle" /></p>
                            </Col>
                        </Card>

                    </Row>

                </Card>
                <Card title="主体动态" style={{ marginTop: 20 }}>
                    <List
                        itemLayout="horizontal"
                        dataSource={data}
                        renderItem={item => (
                            <List.Item>
                                <List.Item.Meta
                                    avatar={<Avatar src={item.avatar} />}
                                    title={<a href="https://ant.design">{item.title}</a>}
                                    description={item.description} />
                            </List.Item>
                        )} />
                    <Row>
                        <Row style={{marginTop: 0}}>
                            <Col xxl={2} xl={3}>
                                <Avatar src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526647161979&di=a213c63c11cbf407e1f7c0208570d118&imgtype=0&src=http%3A%2F%2Fimg1.2345.com%2Fduoteimg%2FqqTxImg%2F2013%2F12%2Fwm%2F26-010722_183.jpg" />
                                <span style={{marginLeft:18}}>章云峰</span>
                        </Col>
                            <Col xxl={22} xl={21}>
                                <TextArea rows={3} placeholder='请输入你的评论信息' />
                            </Col>
                        </Row>
                        <Row type="flex" style={{marginTop:10}} >
                            <Col lg={3} push={21} xl={4}>
                                <Button>提交</Button>
                                <Button style={{marginLeft:20}}>清空</Button>
                            </Col>
                        </Row>
                    </Row>

                </Card>
            </div>
        )
    }
}